#include <stdio.h>
#include <stdint.h>
#include "mini.kit.h"

int main(int argc, char* argv[])
{
	time_t    t;
	struct tm tms;
	if( argc < 2 ) {
		fprintf(stderr, "usage: %s date-time-string format\n", argv[0]);
		return 1;
	}
	const char* dt  = argv[1];
	const char* fmt = "%F %T";
	if( argc > 2 ) {
		fmt = argv[2];
	}
	fprintf(stdout, "dt_string: %s\ndt_format: %s\n", dt, fmt); 
	fprintf(stdout, "%llu\n", (uint64_t)MINIKIT::DateTime::parse(dt, fmt) );
	
/*
	strptime( dt, fmt, &tms);
    	t = mktime(&tms);
	if( -1 == t ){
		//fprintf(stderr, "err\n");
		t = 0;
	}
	fprintf(stdout, "%llu\n", (uint64_t)t);
*/
	return 0;
}

